<template>
  <page-loading :show="pageLoading">
    <!-- 消息 -->
    <view>
      <view class="newsbox" :class="{ newsbox_max: hasNotchInScreen }">
        <view class="toubucss"> 消息 </view>
        <view class="kefuimg2 flex flex-ai-c flex-ja-sa" @click="kefu">
          <i-icon icon="iconkefu1" type="single" size="46rpx"></i-icon>
          <text class="kefuname"> 客服 </text>
        </view>
      </view>
      <!-- <view class="page-box u-skeleton-rect">
      <view class="sousuo">
        <u-search placeholder="搜索" v-model="value" @change="change1" @custom="custom" :animation="true" @search="search"
          :shape="shape" :clearabled="clearabled" :show-action="showAction" :input-align="inputAlign" height="66" width="702"
          bg-color='#FFFFFF'></u-search>
      </view>
      <view class="kefuimg" @click="kefu">
          <i-icon icon="iconkefu1" type="multiple" size="50rpx"></i-icon>
          <view class="kefuname">
            客服
          </view>
      </view>
    </view> -->

      <view class="u-skeleton-rect top_bottom">
        <view class="item item-top" @click="Businessnoticeclick">
          <i-icon
            class="icon-left"
            icon="iconlaba"
            type="single"
            size="100rpx"
            color="#FBD220"
          ></i-icon>
          <!-- <image mode="aspectFill" :src="item.img" /> -->
          <view class="title-wrap">
            <view class="title u-line-2">
              <text class="title-left">业务通知</text>
              <text class="title-right">{{ noticeTime }}</text>
            </view>
            <view class="title">
              <text class="sub-left">{{ noticeMsg }}</text>
              <text class="sub-right" v-if="noticeNum > 0">{{
                noticeNum
              }}</text>
            </view>
          </view>
        </view>
        <view class="line"></view>
      </view>
      <!-- <view v-if="userAddConversationList.length>0">
      <u-swipe-action :show="item.show" :index="index" v-for="(item, index) in userAddConversationList" :key="item.Id"
        @click="click" @open="open" :options="options" :btn-width="btnWidth" @content-click="contentClick" @close="close"
        class="u-skeleton-rect">
        <view class="item" @click="toRoom(item)">
          <image class='icon-left' mode="aspectFill" :src="item.user.img" />
          <view class="title-wrap">
            <view class="title">
							<text class="title-left">{{item.user.user}}</text>
							<text class="title-right">{{item.time}}</text>
            </view>
            <view class="title">
             <!-- <view class="xiaoxiss">
                <rich-text :nodes="nodesFliter(item.conversation.lastMessage.messageForShow)"></rich-text>
              </view> -->
      <!--<text class="sub-left">信息内容缩略</text>
							<text class="sub-right">{{item.conversation.unreadCount}}</text>
            </view>
          </view>
        </view>
     </u-swipe-action>
    </view> -->
      <view v-show="friendList.length > 0">
        <u-swipe-action
          :index="index"
          v-for="(item, index) in friendList"
          :key="item.conversationID"
          :btn-width="btnWidth"
          @content-click="contentClick"
          @close="close"
          class="u-skeleton-rect"
        >
          <view class="item u-border-bottom" @click="checkUserToRoom(item)">
            <view class="icon-left">
              <image
                v-if="item.img"
                class="img"
                mode="aspectFill"
                :src="item.img"
              />
              <image
                v-else
                class="img"
                mode="aspectFill"
                src="@/static/logo/bussinesslogo.png"
              />
            </view>
            <view class="title-wrap">
              <view class="title">
                <text class="title-left">{{ item.user }}</text>
                <text class="title-right">{{
                  $u.timeFrom(item.lastTime, 'YYYY-mm-dd')
                }}</text>
              </view>
              <view class="title">
                <view class="xiaoxiss">
                  <rich-text
                    :nodes="nodesFliter(item.messageForShow)"
                  ></rich-text>
                </view>
                <!-- <text class="sub-left">{{item.messageForShow}}</text> -->
                <view class="sub-right" v-if="item.unreadCount > 0">{{
                  item.unreadCount
                }}</view>
              </view>
            </view>
            <view class="del">
              <i-icon
                icon="iconlajitong"
                type="single"
                size="50rpx"
                color="#FBD220"
              ></i-icon>
              <text>删除</text>
            </view>
          </view>
        </u-swipe-action>
      </view>
      <view v-show="showEmty" class="empty"> 暂无聊天记录 </view>

      <!--    <view class="user-item-box" v-for="(item,index) in friendList" :key="index" @click="checkUserToRoom(item)">
			<view class="user-img">
				<image :src="item.img" alt=""></image>
			</view>
			<view class="user-name">
				{{item.user}}
			</view>
		</view> -->
      <view class="fabubox">
        <u-mask
          :show="fabushow"
          @click="fabushow = false"
          :duration="400"
          :zoom="true"
          :custom-style="{ background: 'rgba(255, 255, 255, 0.93)' }"
        >
          <view :class="fabushow ? 'zujian' : 'Switchmodel'">
            <dly :show="'fabushow'" @fabuguanbi="guanbi" @tap.stop></dly>
          </view>
        </u-mask>
      </view> </view
  ></page-loading>
</template>

<script src="./news.js"></script>

<style lang="scss" scoped>
@import './news.scss';
</style>
